/*
 * 泛型接口 jdk 1.5之后
 */
interface GenInter<T> {
    public void tell();
}

class Works<T> implements GenInter<T> {

    private String name;

    public Works(String name) {
        this.name = name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    @Override
    public void tell() {
        System.out.println(this.getName());
    }
}

public class GenericDemo5 {
    public static void main(String[] args) {
        Works<String> works = new Works<String>("张三");
        works.tell();

    }

}
